<?php

/**
 * Get the value by the current locale
 * @param unknown_type $values
 * @param unknown_type $key
 * @param unknown_type $connector
 */
function get_value_by_locale($values, $key, $current_locale='', $connector = '_')
{
	if(empty($current_locale))
		$current_locale = get_locale();
	$key_with_locale = $key.$connector.$current_locale;

	return $values->$key_with_locale;
}

function display_boolean_value($value)
{
	if($value)
		return '是';
	else
		return '否';
}

?>
